import { reqSellerList } from '@/api';

const state = {
    sellerList: []
};
const getters = {
  seller(state){
    return state.sellerList
  }
};
const mutations = {
  RECEIVESELLERLIST(state, sellerList) {
    state.sellerList = sellerList
    console.log(state.sellerList);
  }
};
const actions = {
  async getSellerList({ commit }, payload) {
    const result = await reqSellerList();
    if (result.code === 200) {
      commit('RECEIVESELLERLIST', result.data);
    }
  },
};

export default {
  state,
  getters,
  mutations,
  actions,
};
